<template>
  <div>
    <Header />
    <div class="back">
      <div class="container">

        <Nested :list='nestedList' />
        <div class="content">
          <Filter :list="provinces" :selectList="selectList" title="考生省份" />
          <Filter :list="schoolYear" :selectList="selectList" title="选择年份" />
          <Filter :list="subject" :selectList="selectList" title="科目选择" />
          <div class="filter">
            <div class="filter-title">你的分数：</div>
            <div class="filter-box search">
              <input type="text" placeholder="请输入分数">
              <button>查找</button>
            </div>
          </div>
          <div>
          </div>
        </div>
        <div class="content">
          <div style="padding-bottom: 20px;">院校信息</div>
          <Table :dataSource="dataSource" :columns="columns" :pagination="false" />
          <div>
          </div>
        </div>
      </div>
      <Footer />

    </div>
  </div>
</template>

<script lang="ts" setup>
import Header from '../../components/header/index.vue'
import Nested from '@/components/nested/index.vue'
import universityList from '@/components/universityList/index.vue'
import Footer from '@/components/footer/index.vue'
import Filter from '@/components/filter/index.vue'
import { provinces, subject, schoolYear } from '@/components/universityNavList/data'
import { ref } from 'vue'
import { NestedType } from '@/components/nested/nested';
import { Table } from 'ant-design-vue'





const nestedList = ref<NestedType[]>([{ name: '首页', path: '/' }, { name: '一分一段' }])
const selectList = ref<string[]>(['全部', '山东', '北京'])
const columns:any = [
  {
    title: '分数',
    dataIndex: 'grade',
    key: 'grade',
    align: 'center',
  },
  {
    title: '位次区间',
    dataIndex: 'rankRange',
    key: 'rankRange',
    align: 'center',
  },
  {
    title: '同分人数',
    dataIndex: 'gradeNum',
    key: 'gradeNum',
    align: 'center',
  },
  {
    title: '建议位次',
    dataIndex: 'suggestRank',
    key: 'suggestRank',
    align: 'center',
  },
]




const data = () => {
  const dataSource: any = [];
  for (let i = 684; i >= 670; i--) {
    dataSource.push({
      grade: i,
      rankRange: `${i}-${i + 10}`,
      gradeNum: i - 660,
      suggestRank: i - 671,
    });
  }
  return dataSource
}
const dataSource = data();

</script>

<style lang="less" scoped>
@import './index.less';
</style>
